package view;

import javax.swing.JPanel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;

import javax.swing.JButton;
import model.kwalificatiebeheer.KwalificatieDossier;
import controller.KerntaakPanelActions;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

public class AddObjectOptionPane extends JOptionPane{
	
	private TreeMap<String,String> results = new TreeMap<String, String>();
	
	public AddObjectOptionPane(String title) {
		Object[] components = {"Titel:"};
		ArrayList<String> results = new ArrayList<String>();
		String result = showInputDialog(null, components, "New "+title, JOptionPane.OK_CANCEL_OPTION);
		if(result != null){
			if(result.length() > 0){
				results.add(result);
				this.results.put("title",results.get(0));
			}
		}
	}
	
	public TreeMap<String,String> getResults(){
		return results;		
	}
}
